<?php
include_once 'config.php';
include_once 'database/dbmysql.php';

header('Content-type: text/html; charset='.FTsso_CHARSET);
//$querystring=$_SERVER['QUERY_STRING'];
//$get = explode('-' , $querystring);
//print_r($_POST);
$mysqldb  =  new DB(DB_HOST, DB_USER, DB_PW, DB_NAME);

$sql = "SELECT * FROM `sso_onlineuser` WHERE  `username` = '".$_POST['username']."'";

//echo $sql;

$user = $mysqldb->GetOne($sql);

if($user == 0){
	$res = array ('a'=>0);
}else{
	$res = array ('a'=>1);
}

echo json_encode($res);
?>
